<section id="summary">
    <h4>Summary</h4>
    <ul class="nav nav-tabs flex-column flex-sm-row">
        {% if analysis.behavior.summary.files %}<li class="nav-item active"><a class="nav-link" href="#summary_files" data-toggle="tab">Accessed Files</a></li>{% endif %}
        {% if analysis.behavior.summary.read_files %}<li class="nav-item"><a class="nav-link" href="#summary_read_files" data-toggle="tab">Read Files</a></li>{% endif %}
        {% if analysis.behavior.summary.write_files %}<li class="nav-item"><a class="nav-link" href="#summary_write_files" data-toggle="tab">Modified Files</a></li>{% endif %}
        {% if analysis.behavior.summary.delete_files %}<li class="nav-item"><a class="nav-link" href="#summary_delete_files" data-toggle="tab">Deleted Files</a></li>{% endif %}
        {% if analysis.behavior.summary.keys %}<li class="nav-item"><a class="nav-link" href="#summary_keys" data-toggle="tab">Registry Keys</a></li>{% endif %}
        {% if analysis.behavior.summary.read_keys %}<li class="nav-item"><a class="nav-link" href="#summary_read_keys" data-toggle="tab">Read Registry Keys</a></li>{% endif %}
        {% if analysis.behavior.summary.write_keys %}<li class="nav-item"><a class="nav-link" href="#summary_write_keys" data-toggle="tab">Modified Registry Keys</a></li>{% endif %}
        {% if analysis.behavior.summary.delete_keys %}<li class="nav-item"><a class="nav-link" href="#summary_delete_keys" data-toggle="tab">Deleted Registry Keys</a></li>{% endif %}
        {% if analysis.behavior.summary.resolved_apis %}<li class="nav-item"><a class="nav-link" href="#summary_resolved_apis" data-toggle="tab">Resolved APIs</a></li>{% endif %}
        {% if analysis.behavior.summary.executed_commands %}<li class="nav-item"><a class="nav-link" href="#summary_executed_commands" data-toggle="tab">Executed Commands</a></li>{% endif %}
        {% if analysis.behavior.summary.mutexes %}<li class="nav-item"><a class="nav-link" href="#summary_mutexes" data-toggle="tab">Mutexes</a></li>{% endif %}
        {% if analysis.behavior.summary.created_services %}<li class="nav-item"><a class="nav-link" href="#summary_created_services" data-toggle="tab">Created Services</a></li>{% endif %}
        {% if analysis.behavior.summary.started_services %}<li class="nav-item"><a class="nav-link" href="#summary_started_services" data-toggle="tab">Started Services</a></li>{% endif %}
        {% if analysis.behavior.summary.reversing_labs %}<li class="nav-item"><a class="nav-link" href="#summary_reversing_labs" data-toggle="tab">Reversing Labs</a></li>{% endif %}
    </ul>
    <div class="tab-content">
        <div class="tab-pane fade show active" id="summary_files">
            <div class="card card-body">
                {% if analysis.behavior.summary.files %}
                    {% for file in analysis.behavior.summary.files %}
                        {{file}}<br/>
                    {% endfor %}
                {% endif %}
            </div>
        </div>
        <div class="tab-pane fade" id="summary_read_files">
            <div class="card card-body">
                {% if analysis.behavior.summary.read_files %}
                    {% for file in analysis.behavior.summary.read_files %}
                        {{file}}<br/>
                    {% endfor %}
                {% endif %}
            </div>
        </div>
        <div class="tab-pane fade" id="summary_write_files">
            <div class="card card-body">
                {% if analysis.behavior.summary.write_files %}
                    {% for file in analysis.behavior.summary.write_files %}
                        {{file}}<br/>
                    {% endfor %}
                {% endif %}
            </div>
        </div>
        <div class="tab-pane fade" id="summary_delete_files">
            <div class="card card-body">
                {% if analysis.behavior.summary.delete_files %}
                {% for file in analysis.behavior.summary.delete_files %}
                {{file}}<br/>
                {% endfor %}
                {% endif %}
            </div>
        </div>
        <div class="tab-pane fade" id="summary_keys">
            <div class="card card-body">
                {% if analysis.behavior.summary.keys %}
                {% for key in analysis.behavior.summary.keys %}
                {{key}}<br/>
                {% endfor %}
                {% endif %}
            </div>
        </div>
        <div class="tab-pane fade" id="summary_read_keys">
            <div class="card card-body">
                {% if analysis.behavior.summary.read_keys %}
                    {% for key in analysis.behavior.summary.read_keys %}
                        {{key}}<br/>
                    {% endfor %}
                {% endif %}
            </div>
        </div>
        <div class="tab-pane fade" id="summary_write_keys">
            <div class="card card-body">
                {% if analysis.behavior.summary.write_keys %}
                {% for key in analysis.behavior.summary.write_keys %}
                {{key}}<br/>
                {% endfor %}
                {% endif %}
            </div>
        </div>
        <div class="tab-pane fade" id="summary_delete_keys">
            <div class="card card-body">
                {% if analysis.behavior.summary.delete_keys %}
                {% for key in analysis.behavior.summary.delete_keys %}
                {{key}}<br/>
                {% endfor %}
                {% endif %}
            </div>
        </div>
        <div class="tab-pane fade" id="summary_resolved_apis">
            <div class="card card-body">
                {% if analysis.behavior.summary.resolved_apis %}
                {% for api in analysis.behavior.summary.resolved_apis %}
                {{api}}<br/>
                {% endfor %}
                {% endif %}
            </div>
        </div>
        <div class="tab-pane fade" id="summary_executed_commands">
            <div class="card card-body">
                {% if analysis.behavior.summary.executed_commands %}
                {% for cmd in analysis.behavior.summary.executed_commands %}
                {{cmd}}<br/>
                {% endfor %}
                {% endif %}
            </div>
        </div>
        <div class="tab-pane fade" id="summary_mutexes">
            <div class="card card-body">
                {% if analysis.behavior.summary.mutexes %}
                {% for mutex in analysis.behavior.summary.mutexes %}
                {{mutex}}<br/>
                {% endfor %}
                {% endif %}
            </div>
        </div>
        <div class="tab-pane fade" id="summary_created_services">
            <div class="card card-body">
                {% if analysis.behavior.summary.created_services %}
                {% for service in analysis.behavior.summary.created_services %}
                {{service}}<br/>
                {% endfor %}
                {% endif %}
            </div>
        </div>
        <div class="tab-pane fade" id="summary_started_services">
            <div class="card card-body">
                {% if analysis.behavior.summary.started_services %}
                {% for service in analysis.behavior.summary.started_services %}
                {{service}}<br/>
                {% endfor %}
                {% endif %}
            </div>
        </div>
        <div class="tab-pane fade" id="summary_reversing_labs">
            <div class="card card-body">
                {% if analysis.reversinglabs %}
                <table class="table">
                    <tr>
                        <th>Name</th>
                        <th>Value</th>
                    </tr>
                    {% for key, value in analysis.reversinglabs.items %}
                    <tr>
                        <td>{{key|capfirst}}</td>
                        {% if key == "permalink" %}
                            <td><a target="_blank" href="{{value}}">{{value}}</a></td>
                        {% elif key == "malicious" and value%}
                            <td><b style="color:red">yes</b></td>
                        {% elif key == "malicious" and not value%}
                            <td><b style="color:green">no</b></td>
                        {% else %}
                            <td>{{value}}</td>
                        {% endif %}
                    </tr>
                    {% endfor %}
                </table>
                {% else %}
                <center><b style="color:red">No results</b></center>
                {% endif %}
            </div>
        </div>
    </div>
</section>
